/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!		
  \file			helpviewer.h
  \date			Jan 2013
  \author		TNick

  \brief		Contains the definition for HelpViewer class


*//*


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Please read COPYING and README files in root folder
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __HELPVIEWER_INC__
#define __HELPVIEWER_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include	<memtrack.h>
#include	<QString>
#include	<QProcess>

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */


/**
*	@brief	
*/
class HelpViewer		: public QObject, public MemTrack		{
	Q_OBJECT
	BBM_TRACK( HelpViewer );
	
	//
	//
	//
	//
	/*  DEFINITIONS    ----------------------------------------------------- */

	/*  DEFINITIONS    ===================================================== */
	//
	//
	//
	//
	/*  DATA    ------------------------------------------------------------ */

private:


	/**
	*	@brief	we are using a separate process to show it
	*/
	QProcess *			proc_;


	/*  DATA    ============================================================ */
	//
	//
	//
	//
	/*  FUNCTIONS    ------------------------------------------------------- */

public:


	/**
	*	@brief	constructor;
	*/
	HelpViewer			( void );


	/**
	*	@brief	destructor;
	*/
	~HelpViewer			( void );


	/**
	*	@brief	shows the assistant and goes to specified location
	*/
	void				showDocumentation			( const QString & file );


private:


	/**
	*	@brief	starts the process
	*/
	bool				startAssistant				( void );


private slots:


	void				error						(
			QProcess::ProcessError		error
			);


	void				finished					(
			int exitCode,
			QProcess::ExitStatus		exitStatus
			);


	void				readyReadStandardError		( void );


	void				readyReadStandardOutput		( void );


	void				started						( void );


	void				stateChanged				(
			QProcess::ProcessState		newState
			);



	/*  FUNCTIONS    ======================================================= */
	//
	//
	//
	//

};	/*	class HelpViewer	*/

/*  CLASS    =============================================================== */
//
//
//
//
#endif // __HELPVIEWER_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
